package com.leyu.mall.site.other;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.leyu.mall.service.mdm.IMDMCityService;


@Controller
@Scope(value = "prototype")
@RequestMapping("city")
public class CityController {
	@Autowired
	protected IMDMCityService mdmCityService;
	
	@RequestMapping(value = "", method = RequestMethod.GET)
	 
		public String getCityList(Model model) throws Exception {
 
		try {
			model.addAttribute("cityMap", mdmCityService.getMDMCityMap());
			
			model.addAttribute("hotcitylist", mdmCityService.getAllHotMDMCity());
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
			return "other/city.html";
	}
}
